﻿using System.Web.Mvc;

namespace OneWorks.Web.Common
{
    public class Class1 : FilterAttribute, IAuthorizationFilter
    {
        public void OnAuthorization(AuthorizationContext filterContext)
        {
            //Utils.Log.LogHandler.Log.Debug("OnAuthorization");
        }
    }

    public class Class2 : FilterAttribute, IActionFilter
    {
        public void OnActionExecuting(ActionExecutingContext filterContext)
        {
            //Utils.Log.LogHandler.Log.Error("OnActionExecuting");
        }

        public void OnActionExecuted(ActionExecutedContext filterContext)
        {
            // Utils.Log.LogHandler.Log.Fatal("OnActionExecuted");
        }
    }

    public class Class3 : FilterAttribute, IResultFilter
    {
        public void OnResultExecuting(ResultExecutingContext filterContext)
        {
            //Utils.Log.LogHandler.Log.Info("OnResultExecuting");
        }

        public void OnResultExecuted(ResultExecutedContext filterContext)
        {
            OneWorks.Common.Log.LogHandler.Log.Info(filterContext.Result);
        }
    }

    public class Class4 : FilterAttribute, IExceptionFilter
    {
        public void OnException(ExceptionContext filterContext)
        {

        }
    }
}
